import request  from "@/utills/request"

/**
 * 获取结算信息
 */
export const findCheckoutInfo = () => {
    return request('/member/order/pre', 'get')
  }
  

  // 添加收获地址
  export const addAddress = (from) => {
    return request('/member/address', 'post', from)
  }

  // 修改地址
  export const updateAddress = (address) => {
    return request(`/member/address/${address.id}`, 'put', address)
  }
  // 提交订单
  export const submitOrder = (params) => {
    return request( '/member/order', 'post', params)
  }

  /**
 * 获取订单详情
 * @param {String} id - 订单ID
 */
export const findOrder = (id) => {
  return request('/member/order/' + id, 'get')
}


